Shell.ActionMode.OVERVIEW,
this._switchToApplication.bind(this));
+ global.stage.connect('scroll-event', (stage, event) => {
+ if (this._workspaceAnimation.canHandleScrollEvent(event))
+ return Clutter.EVENT_PROPAGATE;
+
+ if ((event.get_state() & global.display.compositor_modifiers) === 0)
+ return Clutter.EVENT_PROPAGATE;
+
+ return this.handleWorkspaceScroll(event);
+ });
+
global.display.connect('show-resize-popup', this._showResizePopup.bind(this));
global.display.connect('show-pad-osd', this._showPadOsd.bind(this));
global.display.connect('show-osd', (display, monitorIndex, iconName, label) => {
});
const swipeTracker = new SwipeTracker.SwipeTracker(global.stage,
- Shell.ActionMode.NORMAL, { allowDrag: false, allowScroll: false });
+ Shell.ActionMode.NORMAL, { allowDrag: false });
swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));
swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));
this._swipeTracker = swipeTracker;
+
+ global.display.bind_property('compositor-modifiers',
+ this._swipeTracker, 'scroll-modifiers',
+ GObject.BindingFlags.SYNC_CREATE);
}
_prepareWorkspaceSwitch(workspaceIndices) {
}
}
+ canHandleScrollEvent(event) {
+ return this._swipeTracker.canHandleScrollEvent(event);
+ }
+
_findMonitorGroup(monitorIndex) {
return this._switchData.monitors.find(m => m.index === monitorIndex);
}